package com.github.elliot.usercenter.controller;

import com.github.elliot.usercenter.service.RoleService;
import com.github.elliot.usercenter.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Flux;

import java.util.List;

@RestController
@RequestMapping
public class RoleController {

    @Autowired
    private RoleService roleService;

    @GetMapping("/api/v1/backendUrl")
    public Flux<String> getBackendUrlByRoleList(@RequestParam("roleList") List<String> roleList){
        return roleService.getBackendUrlByRoleList(roleList);
    }

}
